package com.xhui.vimarket.common.utils.string;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * 正则.
 * 
 * @author wuyx
 * @version Revision 1.0.0
 * 
 */
public final class Regex {
    
    /**
     * 私有构造函数. 
     */
    private Regex() {
    }
    
    /**
     * check.
     * 
     * @param expressions String
     * @param str String
     * @return boolean
     */
    public static boolean check(String expressions, String str) {
        Pattern pattern = Pattern.compile(expressions);
        Matcher matcher = pattern.matcher(str);
        return matcher.matches();
    }
    
}
